﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="sitedetails.aspx.vb" Inherits="felixfinalproject2.sitedetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 242px;
        }
        .chart
        {}
        .chart
        {}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder4" runat="server">

    <table style="width:100%;">
        <tr>
            <td class="style1">
                CARS ADDED BY EACH PROFILE OWNER:</td>
            <td>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="AddedBy" HeaderText="AddedBy" 
                SortExpression="AddedBy" />
            <asp:BoundField DataField="CountOfmichelin_stars" 
                HeaderText="CountOfmichelin_stars" SortExpression="CountOfmichelin_stars" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        SelectCommand="SELECT [AddedBy], [CountOfmichelin_stars] FROM [countofcarsadded]">
    </asp:SqlDataSource>
            </td>
            <td>
    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1" BackColor="SteelBlue" 
                    BackGradientStyle="LeftRight" CssClass="chart" Height="150px" Width="370px">
        <series>
            <asp:Series Name="Series1" XValueMember="AddedBy" 
                YValueMembers="CountOfmichelin_stars">
            </asp:Series>
        </series>
        <chartareas>
            <asp:ChartArea Name="ChartArea1">
                <Area3DStyle Enable3D="True" />
            </asp:ChartArea>
        </chartareas>
    </asp:Chart>
            </td>
        </tr>
        <tr>
            <td class="style1">
                AVERAGE RATING OF ALL CARS:</td>
            <td>
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource2">
        <Columns>
            <asp:BoundField DataField="averagerating" HeaderText="averagerating" 
                ReadOnly="True" SortExpression="averagerating" />
            <asp:BoundField DataField="model" HeaderText="model" SortExpression="model" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        SelectCommand="SELECT [averagerating], [model] FROM [carsaverageview]">
    </asp:SqlDataSource>
            </td>
            <td>
                <asp:Chart ID="Chart2" runat="server" BackColor="SteelBlue" 
                    BackGradientStyle="LeftRight" CssClass="chart" DataSourceID="SqlDataSource2" 
                    Height="150px" Width="370px">
                    <Series>
                        <asp:Series Name="Series1" XValueMember="model" YValueMembers="averagerating" 
                            YValuesPerPoint="2">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <Area3DStyle Enable3D="True" />
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
            </td>
        </tr>
        <tr>
            <td class="style1">
                TOTAL NUMBER OF LIKES PER CAR:</td>
            <td>
    <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource3">
        <Columns>
            <asp:BoundField DataField="model" HeaderText="model" SortExpression="model" />
            <asp:BoundField DataField="CountOfID" HeaderText="Total Likes" 
                SortExpression="CountOfID" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        
                    SelectCommand="SELECT [model], [CountOfID] FROM [countlikes] WHERE ([CountOfID] &gt; ?)">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="CountOfID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
            </td>
            <td>
                <asp:Chart ID="Chart3" runat="server" BackColor="SteelBlue" 
                    BackGradientStyle="LeftRight" CssClass="chart" DataSourceID="SqlDataSource3" 
                    Height="150px" Width="370px">
                    <Series>
                        <asp:Series Name="Series1" XValueMember="model" YValueMembers="CountOfID" 
                            YValuesPerPoint="2">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <Area3DStyle Enable3D="True" />
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
            </td>
        </tr>
        <tr>
            <td class="style1">
                TOTAL NUMBER OF PICTURES/PERSON:</td>
            <td>
    <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource4" DataKeyNames="dinerid">
        <Columns>
            <asp:BoundField DataField="dinerid" HeaderText="dinerid" ReadOnly="True" 
                SortExpression="dinerid" />
            <asp:BoundField DataField="CountOfpictures" HeaderText="Total Pictures" 
                SortExpression="CountOfpictures" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        
                    SelectCommand="SELECT * FROM [countuserpictures]">
    </asp:SqlDataSource>
            </td>
            <td>
                <asp:Chart ID="Chart4" runat="server" BackColor="SteelBlue" 
                    BackGradientStyle="LeftRight" CssClass="chart" DataSourceID="SqlDataSource4" 
                    Height="150px" Width="370px">
                    <Series>
                        <asp:Series Name="Series1" XValueMember="dinerid" YValueMembers="CountOfpictures" 
                            YValuesPerPoint="2">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <Area3DStyle Enable3D="True" />
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
            </td>
        </tr>
        <tr>
            <td class="style1">
                TOTAL NUMBER OF COMMENTS/PERSON FOR CARS:</td>
            <td>
    <asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource5">
        <Columns>
            <asp:BoundField DataField="model" HeaderText="model" SortExpression="model" />
            <asp:BoundField DataField="CountOfauthor" HeaderText="Total Car Comment" 
                SortExpression="CountOfauthor" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        
                    SelectCommand="SELECT * FROM [countcommentsforcars]">
    </asp:SqlDataSource>
                <br />
            </td>
            <td>
                <asp:Chart ID="Chart5" runat="server" BackColor="SteelBlue" 
                    BackGradientStyle="LeftRight" CssClass="chart" DataSourceID="SqlDataSource5" 
                    Height="150px" Width="370px">
                    <Series>
                        <asp:Series Name="Series1" XValueMember="model" YValueMembers="CountOfauthor" 
                            YValuesPerPoint="2">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <Area3DStyle Enable3D="True" />
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
            </td>
        </tr>
        <tr>
            <td class="style1">
                TOTAL NUMBER OF COMMENTS/PERSON FOR PICTURES:</td>
            <td>
    <asp:GridView ID="GridView6" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource6">
        <Columns>
            <asp:BoundField DataField="dinerid" HeaderText="dinerid" 
                SortExpression="dinerid" />
            <asp:BoundField DataField="CountOfcomment" HeaderText="Total Picture Comms" 
                SortExpression="CountOfcomment" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource6" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        
                    SelectCommand="SELECT * FROM [picturecommentscount]">
    </asp:SqlDataSource>
                <br />
            </td>
            <td>
                <asp:Chart ID="Chart6" runat="server" BackColor="SteelBlue" 
                    BackGradientStyle="LeftRight" CssClass="chart" DataSourceID="SqlDataSource6" 
                    Height="150px" Width="370px">
                    <Series>
                        <asp:Series Name="Series1" XValueMember="dinerid" YValueMembers="CountOfcomment" 
                            YValuesPerPoint="2">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <Area3DStyle Enable3D="True" />
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
            </td>
        </tr>
        <tr>
            <td class="style1">
                TOTAL CARS ADDED BY USERS: </td>
            <td>
    <asp:GridView ID="GridView7" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource7" DataKeyNames="dinerid">
        <Columns>
            <asp:BoundField DataField="dinerid" HeaderText="dinerid" ReadOnly="True" 
                SortExpression="dinerid" />
            <asp:BoundField DataField="CountOfAddedBy" HeaderText="Total Cars Added" 
                SortExpression="CountOfAddedBy" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource7" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        
                    SelectCommand="SELECT * FROM [countcarsaddedbyusers]">
    </asp:SqlDataSource>
            </td>
            <td>
                <asp:Chart ID="Chart7" runat="server" BackColor="SteelBlue" 
                    BackGradientStyle="LeftRight" CssClass="chart" DataSourceID="SqlDataSource7" 
                    Height="150px" Width="370px">
                    <Series>
                        <asp:Series Name="Series1" XValueMember="dinerid" YValueMembers="CountOfAddedBy" 
                            YValuesPerPoint="2">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1" >
                            <Area3DStyle Enable3D="True" />
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
            </td>
        </tr>
        <tr>
            <td class="style1">
                MOST ACTIVE USERS:</td>
            <td>
    <asp:GridView ID="GridView8" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource8" DataKeyNames="dinerid" Width="259px">
        <Columns>
            <asp:BoundField DataField="dinerid" HeaderText="dinerid" ReadOnly="True" 
                SortExpression="dinerid" />
            <asp:BoundField DataField="SumOfCountOfpictures" HeaderText="Total Pictures" 
                SortExpression="SumOfCountOfpictures" />
            <asp:BoundField DataField="SumOfCountOfAddedBy" HeaderText="Total Cars Added" 
                SortExpression="SumOfCountOfAddedBy" />
            <asp:BoundField DataField="SumOfCountOfcomment" HeaderText="Total comments" 
                SortExpression="SumOfCountOfcomment" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource8" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        
                    SelectCommand="SELECT * FROM [countuseractivity]">
    </asp:SqlDataSource>
            </td>
            <td>
                <asp:Chart ID="Chart8" runat="server" BackColor="SteelBlue" 
                    BackGradientStyle="LeftRight" CssClass="chart" DataSourceID="SqlDataSource8" 
                    Height="150px" Width="370px">
                    <Series>
                        <asp:Series Name="Series1" XValueMember="dinerid" YValueMembers="SumOfCountOfpictures" 
                            YValuesPerPoint="2" ChartType="StackedColumn">
                        </asp:Series>
                    </Series>
                    <ChartAreas>
                        <asp:ChartArea Name="ChartArea1">
                            <Area3DStyle Enable3D="True" />
                        </asp:ChartArea>
                    </ChartAreas>
                </asp:Chart>
            </td>
        </tr>
    </table>

</asp:Content>

<asp:Content ID="Content3" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
</asp:Content>
<asp:Content ID="Content4" runat="server" 
    contentplaceholderid="ContentPlaceHolder2">
</asp:Content>


